package com.jizhi.controller;


import com.alibaba.fastjson.JSONArray;
import com.jizhi.entity.Skull;
import com.jizhi.service.SkullService;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author 王书豪
 * @since 2020-11-18
 */
@RestController
@RequestMapping("/skull")
public class SkullController {
    @Resource
    private SkullService skullService;
    @ApiOperation(value = "查询全部经办人信息", notes = "查询所有经办人信息")
    @GetMapping("/fuilAll")
    @ResponseBody
    public Object fuilAll(){
        List<Skull> list= skullService.fuliAll();
        if(null!=list){
            String json= JSONArray.toJSONString(list);
            return json;
        }else {
            return "查询失败";
        }
    }
}

